<template>
    <div>
        {{this.$store.state.name}}
        <GoodsList @haha = "myhaha" @doudou="doudou" />
        {{ dudu }}
        <div v-for="item in msg">
            {{item}} 
        </div>
    </div>
</template>

<script>
import GoodsList from '@/components/GoodsList.vue';
export default {
    components: {
        GoodsList
    },
    data() {
        return {
            msg:[],
            dudu:''
        }
    },
    methods:{
        myhaha(data){
            console.log(data);
            this.msg = data;
        },
        doudou(data){
            this.dudu = data;
        }
    },


}
</script>

<style scoped></style>